Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fortawesome/fontawesome-svg-core

Package Overview
Dependencies
Maintainers
6
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fortawesome/fontawesome-svg-core

The iconic font, CSS, and SVG framework

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
increased by7.73%
Maintainers
6
Weekly downloads
 
Created

What is @fortawesome/fontawesome-svg-core?

The @fortawesome/fontawesome-svg-core package is part of the Font Awesome system, which provides scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS. This package is the core of Font Awesome and includes the necessary tools to define and use icons in a project.

What are @fortawesome/fontawesome-svg-core's main functionalities?

Adding Icons

This code sample demonstrates how to add an icon to the library so it can be used throughout your application.

import { library } from '@fortawesome/fontawesome-svg-core';
import { faCoffee } from '@fortawesome/free-solid-svg-icons';

library.add(faCoffee);

Using Icons in React

This code sample shows how to use an icon in a React component with the FontAwesomeIcon component.

import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

const IconComponent = () => (
  <div>
    <FontAwesomeIcon icon='coffee' />
  </div>
);

Customizing Icons

This code sample illustrates how to customize an icon's size and color.

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCoffee } from '@fortawesome/free-solid-svg-icons';

<FontAwesomeIcon icon={faCoffee} size='2x' color='blue' />

Layering and Text

This code sample shows how to layer icons and use text with icons.

import { library } from '@fortawesome/fontawesome-svg-core';
import { faCircle, faCheckCircle } from '@fortawesome/free-regular-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

library.add(faCircle, faCheckCircle);

<FontAwesomeIcon icon={['far', 'circle']} />
<FontAwesomeIcon icon={['far', 'check-circle']} />

Other packages similar to @fortawesome/fontawesome-svg-core

Keywords

FAQs

Package last updated on 07 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc